[SPARK-13537][SQL] Fix readBytes in VectorizedPlainValuesReader#11418
Closed
viirya wants to merge 2 commits intoapache:masterfrom
Closed
[SPARK-13537][SQL] Fix readBytes in VectorizedPlainValuesReader#11418viirya wants to merge 2 commits intoapache:masterfrom
viirya wants to merge 2 commits intoapache:masterfrom
Conversation
Member
Author
|
Test build #52142 has finished for PR 11418 at commit
|
|
Test build #52143 has finished for PR 11418 at commit
|
Contributor
|
LGTM Thanks for fixing this. Just out of curiosity, how did you find this initially? |
Member
Author
|
I saw the failure in #11415 jenkins test report. Then I rerun the test locally to find the problematic data and do debugging with it. |
Contributor
|
Thanks - I've merged this in master. |
roygao94
pushed a commit
to roygao94/spark
that referenced
this pull request
Mar 22, 2016
JIRA: https://issues.apache.org/jira/browse/SPARK-13537 ## What changes were proposed in this pull request? In readBytes of VectorizedPlainValuesReader, we use buffer[offset] to access bytes in buffer. It is incorrect because offset is added with Platform.BYTE_ARRAY_OFFSET when initialization. We should fix it. ## How was this patch tested? `ParquetHadoopFsRelationSuite` sometimes (depending on the randomly generated data) will be [failed](https://amplab.cs.berkeley.edu/jenkins/job/SparkPullRequestBuilder/52136/consoleFull) by this bug. After applying this, the test can be passed. I added a test to `ParquetHadoopFsRelationSuite` with the data which will fail without this patch. The error exception: [info] ParquetHadoopFsRelationSuite: [info] - test all data types - StringType (440 milliseconds) [info] - test all data types - BinaryType (434 milliseconds) [info] - test all data types - BooleanType (406 milliseconds) 20:59:38.618 ERROR org.apache.spark.executor.Executor: Exception in task 0.0 in stage 2597.0 (TID 67966) java.lang.ArrayIndexOutOfBoundsException: 46 at org.apache.spark.sql.execution.datasources.parquet.VectorizedPlainValuesReader.readBytes(VectorizedPlainValuesReader.java:88) Author: Liang-Chi Hsieh <viirya@gmail.com> Closes apache#11418 from viirya/fix-readbytes.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
JIRA: https://issues.apache.org/jira/browse/SPARK-13537
What changes were proposed in this pull request?
In readBytes of VectorizedPlainValuesReader, we use buffer[offset] to access bytes in buffer. It is incorrect because offset is added with Platform.BYTE_ARRAY_OFFSET when initialization. We should fix it.
How was this patch tested?
ParquetHadoopFsRelationSuitesometimes (depending on the randomly generated data) will be failed by this bug. After applying this, the test can be passed.I added a test to
ParquetHadoopFsRelationSuitewith the data which will fail without this patch.The error exception: